package cn.remexs.doris.geo.udf;


import cn.remexs.doris.geo.GeoUtils;
import org.apache.hadoop.hive.ql.exec.UDF;

/**
 * 百度09转Wgs84
 */
public class Bd09ToWgs84 extends UDF {

    public String evaluate(Double lon, Double lat) {
        if (null == lon || null == lat) return null;
        double[] wgs84 = GeoUtils.bd09ToWgs84(lon, lat);
        return GeoUtils.buildWkt(wgs84[0], wgs84[1]);
    }
}